#include "stdafx.h"
#include "Export.h"
#include "OperateUi.h"
#include "IOptionsControl.h"
#include "IFrameTools.h"

IFrameTools * glbFrameTools = nullptr;
IOptionTools * glbOptCtrTools = nullptr;               
IOptionUiTools * glbOptUiTools = nullptr;

__declspec(dllexport) bool __cdecl AddInstance( IKernel * ptrKernel )
{
	bool bRetVal = false;
	try
	{
		if ( !ptrKernel )
		{
			goto __end;
		}
		glbFrameTools = reinterpret_cast<IFrameTools *>(ptrKernel->Tools());
		ptrKernel->AddInstance(COperateUi::Instance());
	}
	catch (...)
	{
		goto __end;
	}
	bRetVal = true;
__end:
	return bRetVal;
}
